Parametric identification of the mathematical model of the micro-arc oxidation process

The article is aimed at solving the problem of parametric identification of non-linear object models using the example of a mathematical model of the micro-arc oxidation process. An algorithm for parametric identification, based on an experiment in the micro-arc oxidation process, the results of which form a training and control sample is proposed; sequential training of neural networks and calculation of the parameters estimates of the nonlinear model according to experimental data are performed. Experimental testing of the proposed method of neural network parametric identification on the example of the micro-arc oxidation process confirmed that the standard deviation of current and voltage from the nominal values does not exceed ±4%. The obtained results were used in the development of an intelligent hardware-software complex for the production of protective coatings by the micro-arc oxidation method.


Introduction
The high physical and chemical properties of the coatings obtained in the micro-arc oxidation (MAO) process determine their wide application for protecting products from the adverse effects of the environment.The combination of high microhardness and wear resistance with corrosion resistance ensures the wide application of products with such coatings in many industries [1][2][3].
A number of scientific studies are devoted to the modeling of technological processes using artificial intelligence [21][22][23], for example, the article [24] presents the results of using neural networks to simulate the erosion wear of WC-10Co4Cr coatings with the addition of yttrium oxide.Effective control of such a multidimensional and interrelated process combining chemical, electrochemical and plasma-chemical reactions is impossible without its deep study and the construction of a reduced mathematical model of the process that satisfies Akaike's criteria [25].
The analysis of various methods of parametric identification made it possible to dwell on recurrent methods that provide identification in real time with relatively simple computational algorithms and acceptable convergence of estimates.Carrying out identification allows to carry out current control, management and automation of the process, thereby increasing its technical and economic indicators.

Mathematical model of the micro-arc oxidation process
The studies carried out in Ref. [26] made it possible to develop a nonlinear electrophysical model of the oxidation process, which is shown in Fig. 1.
The electrolyte resistance is modeled by the active resistance R 1 , the cell coating resistance is modeled by a parallel connection of the non-linear active resistance R 2 and the capacitance reactance C 2 .Capacitance C 1 is connected in series with a galvanic cell for current limitation.
To test the adequacy of this model, experimental studies were carried out, during which oxide coatings were applied to 10 rectangular samples 23 × 15 × 1.5 mm in size from commercial aluminum grade AD31T1 using an automated capacitor-thyristor installation for micro-arc oxidation of our own design.The coatings were formed on a sinusoidal current with a frequency of 50 Hz in the anode-cathode mode with a current density of 10 A/dm g/l.An aqueous solution NaOH (0.5 g/l) with the addition of Na2SiO3 (80 g/l) was used as an electrolyte.During the MAO process, the oscillograms of the current and voltage drop in the galvanic cell were measured (two periods with a total duration of 40 ms, which corresponds to 256 points) every 60 s for 30 min.The measured values of current and voltage were saved to a text file.The received information was processed using the MATLAB mathematical calculation system.
Fig. 2 shows the experimental oscillograms of the voltage drop U 1 and current I 1 on a galvanic cell recorded during one period of the supply voltage and the calculated oscillogram of the cell impedance, calculated as the ratio of the voltage drop increment to the current increment (ΔU 1 )/(ΔI 1 ).
An analysis of the oscillograms allows to conclude that they contain four characteristic sections.In the first section (≈2-7 ms), the coating breaks down with a positive half-wave, the voltage applied to it, and the coating resistance drops sharply.In the second section (≈7-11 ms), the current in the cell changes polarity and the coating resistance is restored to its original value of approximately 12 kOhm.In the third section (≈11-17 ms), the coating is broken down by a negative voltage drop.In the fourth section (≈17-22 ms), the voltage drop across the cell changes sign and the coating resistance is restored.
Assuming that the electrolyte resistance R 1 remains constant, on the order of several tens of ohms, we can assume that the coating resistance depends nonlinearly on the voltage applied to it and the current flowing through it.
These dependences calculated from experimental oscillograms for positive and negative cell voltage drops are shown in Figs. 3 and  4.
Due to the ambiguity of the resistance dependence of a galvanic cell on the current flowing through it, the graph of the dependence of the impedance of the galvanic cell on the electrical voltage is approximated (shown in Fig. 4.) The hysteresis of the volt-ampere characteristic (Fig. 5) is the reason for the ambiguous dependence of the resistance of the galvanic cell on the current flowing through it.
The coordinates of the approximating curve for the dependence of the cell resistance on the voltage applied to it are summarized in Table 1.
The mathematical model describing the behavior of the electric circuit for the equivalent process of micro-arc oxidation will look like this:

Estimation of the model parameters of the equivalent electrical circuit of the MAO process
The following parameters of the equivalent circuit are subject to evaluation: the impedance of the electrolyte R 1 , the non-linear active resistance of the coating R 2 , and its equivalent capacitance C 2 .
To estimate the parameters of the cell equivalent circuit, we write an expression for the transfer conductivity function.From (1) follows the following expression: We find the transfer function parameters using the MATLAB System Identification Toolbox application.As a result, the following time constants of the transfer function were obtained, shown in Fig. 6.
Assuming that after breakdown the coating resistance is close to zero, the following expression is obtained to estimate R 1 : where R p is the set of impedances of the galvanic cell formed in the breakdown areas of the coating.
If we assume that the reactance of the capacitance C 2 is much greater than the maximum active resistance R 2 , then the estimate of R 2 will be the expression Knowing the estimates R1 and R2 by expressions (3), we can find the estimate Ĉ2 .
In the MATLAB environment, a program was developed for calculating the estimates of the model parameters of the equivalent electrical circuit of the MAO process.The program operation algorithm consists of the following steps.
1.During the formation of the MAO coating, 18 oscillograms of the voltage drop and current of the galvanic cell are sequentially recorded every minute (Fig. 7a and b).
The change in the resistance R 1 in different experiments is shown in Fig. 8.
3. According to formula (5), R 2 is calculated.The graph of the change in resistance R 2 in various experiments is illustrated in Fig. 9. 4. We calculate the average value of the resistance R 2 for the period.The change over the period of the average value of the resistance R 2 is shown in Fig. 10.
A. Semenov et al.
An analysis of the results of calculating the estimates of the model parameters of the equivalent electrical circuit of the MAO process showed that during the growth of the oxide coating, the value of the resistance R 2, average for the period of the electrical voltage changes noticeably.The remaining parameters of the equivalent circuit remain practically unchanged.
We will assume that the rate of growth of the MAO coating thickness is inversely proportional to its thickness, and the thickness is  directly proportional to the value of the resistance R 2 , average for the period of the supply voltage, which we denote by R s .In that case, the rate of change in the relative resistance value R s is approximated by the expression where R s0 is the initial value of the resistance R s , a and k are the approximating coefficients that can be found by minimizing the discrepancy between the experimental and calculated data.Fig. 11 shows the approximation results obtained with a = 1.6542 and k = 0.0865.The main characteristics of the linearized model of the MAO process were calculated.To do this, the model was presented in the state space for the idle (no coating breakdown) and short circuit (coating breakdown) modes.
where x = ( I 1 I 2 ) T ; y = I 1 ; Fig. 12 shows the impulse response of the model, Fig. 13 shows its logarithmic amplitude-frequency response and phase-frequency response characteristics.
The model is stable, since the roots of the characteristic equation are positive, the Model is controllable and observable, since the ranks of the controllability and observability matrices are equal to the order of the system, however, the model is ill-conditioned, which can lead to significant errors in its parametric identification.

Statement of the problem of identifying the model parameters of the electric equivalent circuit of the MAO process
Estimation of the model parameters of the equivalent electrical circuit of the MAO process showed that the main variable parameter of the model of the electrical circuit is the impedance of the cell coating.At the same time, when calculating the parameters of the equivalent circuit from experimental oscillograms, significant identification errors are observed due to the poor model conditionality.
To reduce identification errors, it is proposed to use neural networks in the framework of reservoir computing to solve the considered identification problem [27][28][29].
The main idea of reservoir computing is to use a dynamic neural network as a reservoir that is filled with displays of various states of the original system obtained using this network, while filling the reservoir can occur both purposefully and randomly.The data filling the reservoir is read by a static neural network, which, according to the state of the reservoir, solves the problem of calculating the required parameters [30].
We formulate the initial formulation of the reservoir calculations problem of the MAO model parameters in the following formulation.
The arrays of experimental oscillograms (Fig. 4) of the voltage   and current obtained at fixed equidistant time intervals t 1 , t 2 , …t n in each of m experiments carried out at regular time intervals of 1 min, as well as the vector for estimating the parameters of the MAO model Θ = [R 1 , R 2 , C 2 ] T , obtained from the results of processing arrays ( 8) and ( 9), are given.
Arrays ( 8) and ( 9) form a training sample used to train a dynamic neural network.The learning result maps the arrays P d , T d to the array of synaptic and weight coefficients of the dynamic neural network W d .
The second static neural network based on the training sample W d , composed of the array of synaptic coefficients of the trained dynamic neural network and the model parameter estimation vector Θ calculates a new estimate of the model parameters Θ.
Taking into account the powerful approximating capabilities of neural networks, one should expect high accuracy of parametric identification.

Parametric identification algorithm
The following algorithm is proposed for calculating the average value of the resistance R 2 over the period of the supply voltage.
1. From the experimental oscillograms shown in Fig. 1, training and control samples are formed.2. On the sample P d , T d (10), a dynamic neural network is trained and, as a result of training, a matrix of its synaptic coefficients W d (11) is formed.3. A new training sample is formed to train the second static neural network (12).
4. The second static network is trained on the sample (12) and the estimate of the parameter vector θ of the model ( 1) is calculated in each of m experiments.5. Experimental oscillograms (2) that did not participate in training experiments are fed to the input of the dynamic neural network, and the vector of synaptic coefficients w r for the current state of the object is evaluated.6.The calculated coefficients are fed to the input of the next trained static neural network, then the vector of model parameters is estimated to describe the current state of the real object θ.

Parametric identification of a non-linear object model
Parametric identification was carried out in accordance with the proposed algorithm: 1. 15 experimental oscillograms were used to obtain the training sample (10).Oscillograms 3, 9 and 15 made up the control sample.2. Sample (10) was used to train a three-layer feedforward neural network with 2 neurons and a tangential activation function in the first layer and with one neuron and linear activation functions in the second and third layers.The number of synaptic coefficients and neural network bias functions are summarized in Table 2.
The training sample is a 15 × 15 matrix consisting of 15 rows for the number of experiments and 15 columns for the number of synaptic coefficients and bias functions.The network was trained according to the Levenberg-Marquardt method with Bayesian regularization.The maximum value of the current calculation error did not exceed 0.1 mA.
3. From the obtained matrix of synaptic coefficients of the dynamic neural network, a new training sample ( 12) is formed to train the second static neural network.4. The training set (12) was used to train the second neural network, which was chosen as the radial basic network, which provides a zero-learning error.5.The experimental values of the current and voltage of the galvanic cell from the control sample were fed to the input of the neural network, then the vector of its synaptic coefficients and bias functions were calculated.6.The calculated parameter vectors of the first neural network were fed to the input of the trained second static neural network, and the estimate of the parameter vector of the real object model θ was calculated (Table 3).
It can be noted that the calculated data of the relative resistance value r, obtained by expression (6), coincide exactly with the data obtained as a result of identification.

Conclusions
The paper solves the problems of parametric identification of a nonlinear model of an object using the example of a mathematical model of the micro-arc oxidation process, which is advisable to use in the development of an intelligent hardware-software complex for obtaining protective coatings with desired properties by the micro-arc oxidation method.The following main results have been obtained: 1.The problem of parametric identification of models of nonlinear objects is formulated, which boils down to mapping experimentally obtained input and output variables of an object into an estimate of its parameters using two neural networks.2.An algorithm for parametric identification, the essence of which is to conduct an experiment on a real object, forming training and control samples based on the results of the experiment, sequentially training neural networks and calculating, using trained networks, estimates of the parameters of a nonlinear model from experimental data, was developed.3. A combination of two neural networks is proposed, the distinctive feature of which is the supply of synaptic coefficients of the first neural network to the input of the second neural network during training and subsequent work.4. In such a network, the mapping of experimental data to model parameters is carried out in the following sequence: experimental data are compared with the synaptic coefficients of the first neural network, and then they are fed to the inputs of the second neural network, the output of which contains the desired parameters of the nonlinear model.5. Experimental verification of the proposed method of neural network parametric identification using the micro-arc oxidation process as an example, considered in detail in Refs.[22,23], showed that the standard deviation of current and voltage from the nominal values does not exceed ±4%.6.Taken into account the good approximating ability of neural networks, the proposed algorithm and neural networks can be considered as an effective identification method.
Thus, the results of the study make it possible to carry out current monitoring and control of the microarc oxidation process with subsequent automation, which ensures a significant increase in its technical and economic indicators.

Fig. 3 .
Fig. 3. Dependence of the resistance of a galvanic cell on the current flowing through it: 1 -negative half-wave; 2 -positive half-wave.

Fig. 10 .
Fig. 10.Change over the period of the average value of the resistance R 2 in each experiment.

Fig. 11 .
Fig. 11.Approximation of the average value of the resistance R 2 for the period of the supply voltage: 1 -experimental results; 2 -calculated data.

Table 1
Values of the approximating curve.
A.Semenov et al.

Table 2
Number of synaptic coefficients and bias functions.